import com.google.common.base.Function;
import com.google.common.collect.Lists;
import lombok.Builder;
import org.springframework.util.Assert;

import java.util.*;
import java.util.stream.Collectors;

@Builder(toBuilder = false)
public class TestTemp {
    private int test;
    private double test2;
    private String test3;

    public static void main(String[] args) {
//        int count = 0;
//        String orderId = "1eeb452e72738a5d5643ed2f876c4d43_浙B3N298_203NWC";
////        String orderId = "1eeb452e72738a5d5643ed2f876c4d43";
//        if (count > 0) {
//            System.out.println(orderId);
//        }
//        if (count <= 0 && !orderId.contains("_")) {
//            orderId = orderId + "_" + "浙B3N298" + "_" + "203NWC";
//            System.out.println(orderId);
//        } else {
//            orderId = orderId.split("_")[0];
//            System.out.println(orderId);
//
//        }
//
//        int[] a = {1,2,3};
//        Stream.of(a).filter(e->e>2).findFirst();
//        Stream<int[]> stream = Stream.of(a).filter(e -> e.<2);
//        stream.map();
//        Stream.of(a).forEach();
//        IntStream.range(1, 10)
//                .peek(x -> Sys    tem.out.print("\nA" + x))
//                .limit(3)
//                .peek(x -> System.out.print("B" + x))
//                .forEach(x -> System.out.print("C" + x));
//        Test truck=null;
//        Integer integer = Optional.ofNullable(truck).map(Test::getA).orElse(null);
//        Optional.ofNullable(truck).ifPresent(Test::getA);
//        System.out.println(integer);
//        String[] split = {"a","b","c"};
//        System.out.println(split[split.length]);
//
//        ArrayList<String> strings = Lists.newArrayList("a", "b", "C");
//        String dds= null;
////        strings.forEach();
//        List<String> a = strings.stream().filter(e -> e.equals("a")).collect(Collectors.toList());
////        strings.stream().map();
////        Stream<Object> objectStream = Stream.of(integer).map(Integer::toString);
//        String ids = "a";
//        List<String> array = Arrays.asList(ids.split(","));
        ArrayList<Test> list = new ArrayList<>();
        ArrayList<Test> list1 = new ArrayList<>();
        list1.add( new Test(19,"z"));
        list1.add( new Test(20,"q"));
        list.add( new Test(21,"l"));
        list.add( new Test(14,"l"));
        list.add( new Test(18,"l"));
        list.add( new Test(50,"l"));
        list.forEach(test1 -> {
            if (test1.getAge()<20){
                return;
            }
            System.out.println(test1.getAge());
        });
//        Map<String, Test> map = list.stream().collect(Collectors.toMap(Test::getAge, Function.identity(),(v1, v2)->v1));

        HashMap<Object, Object> map = new HashMap<>();
        map.put(0,list);
        map.put(1,list1);
        Set<Map.Entry<Object, Object>> entries = map.entrySet();
//        System.out.println(1);


//        HashMap<Double, Object> map = new HashMap<>();
//        map.put(1.0,"a");
//        map.remove(1.0);
//        list.sort(Comparator.comparing(Test::getAge).reversed());

//        String test = null;
//        String[] split = null;
//
//        ArrayList<String> strings = Lists.newArrayList(split);
        System.out.println(11);


    }
}
